<!DOCTYPE>
<html lang="en">
<head>
    <meta charset="UTF-8">
<title></title>
</head>

<script type="text/javascript">
    function whichButton(event){
        var btnNum = event.button;
        if(btnNum==0){
            alert("您点击了鼠标左键！")
        }else if(btnNum==2){
            alert("您点击了鼠标右键！")
        }else if(btnNum==1){
            alert("您点击了鼠标中键！");
        }else{
            alert("不确定");
        }
    }
</script>
<body onmousedown="whichButton(event)">
</body>
</html>
